export type BasePages = "home" | "discover" | "shop" | "user" | "calendar";

export type ItemTypes =
  | "course"
  | "talk"
  | "exhibition"
  | "shopitem"
  | "bundlecourse";

export type EventTypes = Extract<ItemTypes, "course" | "exhibition" | "talk">;

export const enum OrderTypes {
  Events = "events",
  StoreItems = "storeItems",
}

export type SubPages =
  | `${ItemTypes}-detail`
  | "about-subpage"
  | "cart"
  | "user-details-edit"
  | "user-details-overview"
  | "user-event-history"
  | "user-order-listing"
  | "user-order-details"
  | "user-liked-items"
  | "user-waiting-list"
  | "user-gift-certificates"
  | "user-gift-certificates-detail"
  | "user-gift-certificates-share-form"
  | "user-refund"
  | "user-refund-detail"
  | "user-refund-delivery"
  | "user-invoice-center"
  | "user-invoice-select"
  | "user-invoice-form"
  | "user-invoice-detail"
  | "frequent-questions"
  | "privacy-policy"
  | "terms-conditions"
  | "order-status"
  | "checkout"
  | "gift-certificate-select"
  | "web-view-container"
  | "shop-item-separate-list"
  | `address-details${"-edit" | ""}`;

export type BasePagesUrls = `pages/${BasePages}/index`;
export type SubPagesUrls = `pages/${SubPages}/index`;

export type PagesNavigation =
  | BasePagesUrls
  | `${Extract<BasePagesUrls, "pages/discover/index">}?id=${number}`
  | SubPagesUrls
  | `${SubPagesUrls}?id=${number | string}`
  | `${Extract<
      SubPagesUrls,
      "pages/user-event-history/index"
    >}?eventType=${EventTypes}`
  | `${Extract<
      SubPagesUrls,
      "pages/user-order-details/index"
      // Order id and order type
    >}?orderNo=${string}`
  | `${Extract<
      SubPagesUrls,
      "pages/web-view-container/index"
    >}?link=${string}&name=${string}`
  | `${Extract<SubPagesUrls, "pages/web-view-container/index">}?mode=${string}`
  | `${Extract<
      SubPagesUrls,
      "pages/gift-certificate-select/index"
    >}?preOrderNo=${string}`
  | `${Extract<SubPagesUrls, "pages/checkout/index">}?preOrderNo=${string}`
  | `${Extract<SubPagesUrls, "pages/order-status/index">}?type=${number}`
  | `${Extract<SubPagesUrls, "pages/user-refund/index">}?orderNo=${string}`
  | `${Extract<
      SubPagesUrls,
      "pages/user-refund-detail/index"
    >}?orderNo=${string}`
  | `${Extract<
      SubPagesUrls,
      "pages/user-refund-delivery/index"
    >}?orderNo=${string}`
  | `${Extract<
      SubPagesUrls,
      "pages/user-gift-certificates-detail/index"
    >}?no=${string}&senderId=${number}&sender=${string}&receiver=${string}&message=${string}`
  | `${Extract<SubPagesUrls, "pages/terms-conditions/index">}`;
